package servlets;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import dao.UsuarioDao;

@WebServlet("/PreAlterar")
public class PreAlterar extends HttpServlet {
	private static final long serialVersionUID = 1L;

	public PreAlterar() {
		super();
		// TODO Auto-generated constructor stub
	}

	@Override
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doPost(request, response);
	}

	@Override
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		HttpSession session = request.getSession();
		String login = request.getRemoteUser();

		UsuarioDao uDao = new UsuarioDao();

		// String nome = (String) session.getAttribute("");
		// String login = (String) request.setAttribute("usuarioLogin",
		// usu.getLogin());
		// String senha = (String) request.setAttribute("usuarioSenha",
		// usu.getSenha());
		// String sexo = (String) request.setAttribute("usuarioSexo",
		// usu.getSexo());

		RequestDispatcher rd = request.getRequestDispatcher("alterarUsuario.jsp");
		rd.forward(request, response);
	}

}
